home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 83 / MacAddict_083_2003-07.iso / mac / Software / Development / VLC Source 0.5.3.dmg / include / main.h < prev    next >
C/C++ Source or Header  |  2003-04-07  |  4KB  |  106 lines

  1. /*****************************************************************************
  2.  * main.h: access to all program variables
  3.  * Declaration and extern access to global program object.
  4.  *****************************************************************************
  5.  * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
  6.  * $Id: main.h,v 1.53 2003/02/17 05:50:31 sam Exp $
  7.  *
  8.  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  9.  *
  10.  * This program is free software; you can redistribute it and/or modify
  11.  * it under the terms of the GNU General Public License as published by
  12.  * the Free Software Foundation; either version 2 of the License, or
  13.  * (at your option) any later version.
  14.  * 
  15.  * This program is distributed in the hope that it will be useful,
  16.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.  * GNU General Public License for more details.
  19.  *
  20.  * You should have received a copy of the GNU General Public License
  21.  * along with this program; if not, write to the Free Software
  22.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  23.  *****************************************************************************/
  24.  
  25. /*****************************************************************************
  26.  * libvlc_t (global variable)
  27.  *****************************************************************************
  28.  * This structure has an unique instance, statically allocated in main and
  29.  * never accessed from the outside. It store once-initialized data such as
  30.  * the CPU capabilities or the global lock.
  31.  *****************************************************************************/
  32. struct libvlc_t
  33. {
  34.     VLC_COMMON_MEMBERS
  35.  
  36.     /* Initialization boolean */
  37.     vlc_bool_t             b_ready;
  38.  
  39.     /* CPU extensions */
  40.     uint32_t               i_cpu;
  41.  
  42.     /* Generic settings */
  43.     int                    i_verbose;                       /* info messages */
  44.     vlc_bool_t             b_color;                       /* color messages? */
  45.  
  46.     /* Object structure data */
  47.     int                    i_counter;                      /* object counter */
  48.     int                    i_objects;              /* Attached objects count */
  49.     vlc_object_t **        pp_objects;               /* Array of all objects */
  50.  
  51.     /* The message bank */
  52.     msg_bank_t             msg_bank;
  53.  
  54.     /* The module bank */
  55.     module_bank_t *        p_module_bank;
  56.  
  57.     /* Arch-specific variables */
  58. #if defined( SYS_BEOS )
  59.     vlc_object_t *         p_appthread;
  60.     char *                 psz_vlcpath;
  61. #elif defined( SYS_DARWIN )
  62.     char *                 psz_vlcpath;
  63. #elif defined( WIN32 ) && !defined( UNDER_CE )
  64.     SIGNALOBJECTANDWAIT    SignalObjectAndWait;
  65.     vlc_bool_t             b_fast_mutex;
  66.     int                    i_win9x_cv;
  67.     char *                 psz_vlcpath;
  68. #endif
  69. };
  70.  
  71. /*****************************************************************************
  72.  * vlc_t, p_vlc
  73.  *****************************************************************************
  74.  * This structure is a LibVLC instance.
  75.  *****************************************************************************/
  76. struct vlc_t
  77. {
  78.     VLC_COMMON_MEMBERS
  79.  
  80.     /* Global properties */
  81.     int                    i_argc;           /* command line arguments count */
  82.     char **                ppsz_argv;              /* command line arguments */
  83.     char *                 psz_homedir;             /* user's home directory */
  84.  
  85.     /* Generic settings */
  86.     mtime_t                i_desync;   /* relative desync of the audio ouput */
  87.  
  88.     /* Fast memcpy plugin used */
  89.     module_t *             p_memcpy_module;
  90. #if defined( UNDER_CE )
  91.     void* ( __cdecl *pf_memcpy ) ( void *, const void *, size_t );
  92.     void* ( __cdecl *pf_memset ) ( void *, int, size_t );
  93. #else
  94.     void* ( *pf_memcpy ) ( void *, const void *, size_t );
  95.     void* ( *pf_memset ) ( void *, int, size_t );
  96. #endif
  97.  
  98.     /* Shared data - these structures are accessed directly from p_vlc by
  99.      * several modules */
  100.     input_channel_t *      p_channel;                /* channel library data */
  101.  
  102.     /* Locks */
  103.     vlc_mutex_t            config_lock;          /* lock for the config file */
  104. };
  105.  
  106.